from rest_framework.renderers import JSONRenderer

class CustomJSONRenderer(JSONRenderer):
    def render(self, data, accepted_media_type=None, renderer_context=None):
        # 指定编码格式为 utf-8
        options = {'ensure_ascii': False}  # 设置 ensure_ascii 为 False
        return super().render(data, accepted_media_type, renderer_context, options)